<template>
  <div class="title-back">
     <el-button type="primary" @click="back">
      {{$t('cm.return')}}
    </el-button>
    <div class="title">
       <span>{{title}}</span>
    </div>
  </div>
</template>
<script>
export default {
  name: 'TitleBack',
  props: {
    title: {
      type: String,
      default:""
    },
  },
  data () {
    return {
    }
  },
  created () {
  },
  methods: {
    back(){
       this.$router.go(-1);//返回上一层
    }
  },
  watch: {
  }
}
</script>
<style lang="scss">
  .title-back{
    background: #fff;
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #dcdfe6;
    div{
      flex: 1;
      line-height: 38px;
      color: #333;
      font-size: 18px;
      padding-left: 20px;
    }
  }
  
</style>
